﻿<%@ WebHandler Language="C#" Class="DelBill" %>

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.SessionState;
using BLL;
using Model;
public class DelBill : IHttpHandler, IRequiresSessionState
{

    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/plain";


        string tno = context.Request.Params["Tno"].ToString();
        WayBillService wb = new WayBillService();

        List<TnoInfo> lst = wb.GetList(tno, 1);

        string err = "ok";
        if (wb.DelBill(lst, ref err))
        {
            context.Response.Write("ok");
        }
        else
        {
            context.Response.Write(err);

        }
    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

}